<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<%@include file="include.jsp" %>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
</head>
<body>
<input type="button" id="click" value="最简单闭包演示" />
<script type="text/javascript">
	function out(){
		var i = 0 ;
		function inner(){
			alert(i++);
		}
		return inner;
	}
	
	KISSY.use("node",function(S,node){
		var $ = S.all;
		$("#click").on("click",function(){
			var t = new out();
			    t();
			    t();
			    t();
		})
	})
</script>
</body>
</html>